using System;
using System.Collections.Generic;

[Serializable]
public class AchievementResource
{
	public enum AchievementType
	{
		SkillAchievement = 0,
		MatchAchievement = 1,
		ItemAchievement = 2,
		CollectorAchievement = 3,
		SuccessInARowAchievement = 4,
		LevelAchievement = 5,
		LevelNameAchievement = 6,
		FacebookFriendsAchievement = 7
	}

	public string name;

	public AchievementType achievementType;

	public int achievementIndex;

	public GameplayAchievement achievement
	{
		get
		{
			List<GameplayAchievement> achievementsForType = GGStoryAchivementsController.instance.GetAchievementsForType(achievementType);
			return (achievementIndex >= achievementsForType.Count) ? null : achievementsForType[achievementIndex];
		}
	}

	public AchievementResource(AchievementType type, int index, string name)
	{
		achievementType = type;
		achievementIndex = index;
		this.name = name;
	}
}
